﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ViewMasterPageMain.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="estudent.Models" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	VpisniListiStudenta
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="JQueryContent" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="InnerRightContent" runat="server">
<h1>VPISNI LISTI</h1>

<p>Študent <%=ViewData["ime"]%> <%=ViewData["priimek"]%> z vpisno številko (<%=ViewData["vpisna"]%>) ima naslednje vpise.</p>

<p>Kliknite ustrezni vpis, katerega želite urediti.</p>
<table border="1" cellpadding="0" cellspacing="0">
    <tr align="center">
        <th style="width:45px;">Št.</th>
        <th style="width:70px;">Št. leto</th>
        <th  style="width:50px;">Letnik</th>
        <th  style="width:270px;">Smer</th>
        <th  style="width:70px;">Vrsta</th>
        <th style="width:60px;">&nbsp;</th>
    </tr>
<%
    int i = 1;
    foreach (var vpis in (IEnumerable<Vpisi>)ViewData["studentoviVpisi"])
    {
        Response.Write("<tr align='center'>");
        Response.Write("<td>" + i + "</td>");
        Response.Write("<td>" + vpis.letoVpisa.Year + "/" + (vpis.letoVpisa.Year+1) + "</td>");
        Response.Write("<td>" + vpis.LetnikiStudija.opisLetnika + "</td>");
        Response.Write("<td>" + vpis.SSmeri.imeSmer + "</td>");
        Response.Write("<td>" + ((vpis.VrsteVpisa.idVrstaVpisa.CompareTo("V1") == 0) ? "" : vpis.VrsteVpisa.idVrstaVpisa) + "</td>");
        Response.Write("<td>" + Html.ActionLink("uredi", "Uredi", new { Controller = "VpisniList", Action = "Uredi", id = ViewData["vpisna"], idVpis = vpis.idVpisa.ToString() }) + "</td>");
        Response.Write("</tr>");
        i++;
    }
    
     %>
</table>
<br />
</asp:Content>

